# coding=utf-8
# Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from gfootball.eval_server.proto import game_server_pb2 as gfootball_dot_eval__server_dot_proto_dot_game__server__pb2


class GameServerStub(object):
  # missing associated documentation comment in .proto file
  pass

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.GetEnvResult = channel.unary_unary(
        '/gfootball.eval_server.GameServer/GetEnvResult',
        request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultRequest.SerializeToString,
        response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultResponse.FromString,
        )
    self.Step = channel.unary_unary(
        '/gfootball.eval_server.GameServer/Step',
        request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepRequest.SerializeToString,
        response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepResponse.FromString,
        )
    self.GetCapacity = channel.unary_unary(
        '/gfootball.eval_server.GameServer/GetCapacity',
        request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityRequest.SerializeToString,
        response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityResponse.FromString,
        )
    self.CreateGame = channel.unary_unary(
        '/gfootball.eval_server.GameServer/CreateGame',
        request_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameRequest.SerializeToString,
        response_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameResponse.FromString,
        )


class GameServerServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def GetEnvResult(self, request, context):
    """Rpc for obtaining the current state.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Step(self, request, context):
    """Rpc for doing a step in the environment and obtaining a state after that.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetCapacity(self, request, context):
    """Rpc for informing Master how many games can still be scheduled on this GS.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateGame(self, request, context):
    """Rpc to create a new game instance, only called by Master.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_GameServerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetEnvResult': grpc.unary_unary_rpc_method_handler(
          servicer.GetEnvResult,
          request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultRequest.FromString,
          response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetEnvResultResponse.SerializeToString,
      ),
      'Step': grpc.unary_unary_rpc_method_handler(
          servicer.Step,
          request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepRequest.FromString,
          response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.StepResponse.SerializeToString,
      ),
      'GetCapacity': grpc.unary_unary_rpc_method_handler(
          servicer.GetCapacity,
          request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityRequest.FromString,
          response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.GetCapacityResponse.SerializeToString,
      ),
      'CreateGame': grpc.unary_unary_rpc_method_handler(
          servicer.CreateGame,
          request_deserializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameRequest.FromString,
          response_serializer=gfootball_dot_eval__server_dot_proto_dot_game__server__pb2.CreateGameResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'gfootball.eval_server.GameServer', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
